From: http://hi.baidu.com/koko200147/blog/item/7e3cad828c9b9bb66d8119cb.html
Thanks to the original author!
Qstring is Unicode. UTF16 in qt4.
Qstring fromascii (const char * STR, int size =-1)Qstring fromlatin1 (const char * STR, int size
The Qstring class of QT provides a convenient interface for string manipulation.
Causes a character to fill a string, meaning that all characters in the string are replaced by the equal-length ch.
Qstring::fill (Qchar ch, int size
QT Version: 5.5.1Qt's qstring is rich in functionality, and support for non-English languages is not a problem, but not directly supported. For example, like?
1
QString str("死亡使者赛维");
This is directly constructed with
This time I went home and had no time to write it. Today I found that my blog editor has a new version. Let's try the new editor function first!
Today we are talking about QString. The reason why QString is taken out separately is that string is a
This article from: http://blog.csdn.net/lanmanck/archive/2009/07/05/4322656.aspxHow to convert qstring to char * or vice versa
Note: The following method should be qt3.0. Some methods are similar. For more information, see qt4 Class
Under QT, strings are used qstring, which is really convenient for developers. QT re-use of third-party open source libraries, because the type of library is basically a standard type, the number of strings encountered is the char* typeQT re-use of
A const char* (LPCTSTR) pointer passed to unallocated memory.CString CStr (ASDD);CONST char* ch = (LPCTSTR) CStr;Ch points to the same address as the CStr. However, because the use of const guarantees that CH will not be modified, it is safe. 2.
Http://blog.csdn.net/ymc0329/article/details/7284514
Convert int to qstringInt M = 1;Qstring B;B = qstring: Number (m)
Convert qstring to intQstring A = "1111"Int B;B = A. toint ()
Char to qstringChar A = 'B ';Qstring STR;STR = qstring
Recently, I was working on a project where someone else's program was used, and the interface of this program gave std: wstring type, while processing the string, QString in QT is much more powerful than wstring, so the conversion between these two
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.